package com.cc.visitor.service;

import com.cc.visitor.dto.ReqParamEnterMill;
import com.cc.visitor.entity.Visit;
import com.cc.visitor.entity.VisitStatistics;
import com.cc.visitor.enums.UserType;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;

import java.io.IOException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * @author chanchaw
 * @create 2024-09-27 10:22
 */
public interface VisitService {
    List<Visit> getMyTodayThreeProgressVisit(String unionId);
    Visit insert(Visit record);
    int delete(Integer id);
    Visit update(Visit record);
    List<Visit> get8DateRange(LocalDateTime sdate, LocalDateTime edate);
    List<Visit> get8DateRangeOpenId(String openId,LocalDateTime sdate, LocalDateTime edate);
    List<Visit> getMonthList8OpenId(String unionId, LocalDate date) throws Exception;
    int setVoid(Integer id);
    Boolean canVoid(Visit record);
    int audit(String unionId, Integer id);
    int audit(String unionId, Integer id, Integer audit);
    Boolean isAudited(Integer id);
    Integer scanEnterQrCode(Integer id);
    List<Visit> getVisit8Progress(String progress);
    List<Visit> getVisit8ProgressAll();
    List<Visit> getVisitInProgress();// 进行中的访单（访单综合管理报表第一个标签页）
    List<Visit> getVisitFinishedProgress(LocalDate sdate, LocalDate edate);// 获取已完成的访单
    VisitStatistics getVisitStatistics(@Param("unionId")String unionId);
    Boolean isFinished(Visit visit);
    Boolean isAudited(Visit visit);
    Integer finishVisit(Integer id);
    Integer finishVisit(Visit record);
    String getQrSceneString(Integer id);
    Integer reject(Visit record);
    Visit getLastVisit8RealName(String realName);
    Visit insertNull(String unionId);
    Visit scanEntryQrcode(String qrScene);
    Integer setLeave(Integer id);
    Visit getLastSubrogate8RealName(String realName);
    Visit getLastVisit8UnionId(String unionId,Integer subrogate);
    Boolean ignorePushVisitorAudited(Integer id);
    Visit selectOneById(Integer id);
    Integer setChildForeignKey(Visit record);
    Map<String,String> exportWord(Integer id) throws IOException, InvalidFormatException;
    String getImgFile(String imgFile);
    Boolean check4Insert(Visit record);
    Boolean check4Scan(Visit record);
    Integer setEntry(Integer id);
    List<Visit> getVisit8ProgressRecent(String unionId,String progress);
    Map<String,String> exportPdf(Integer id) throws IOException, InvalidFormatException;
    List<Visit> checkWithinTime(String visitorUnionId);
}
